package com.suyuan.entity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 购物项
 */
public class CustomCartItem implements Serializable{

    /**
     * 主键
     */
    private Integer id;

    /**
     * 所属购物车
     */
    private Integer cartId;

    /**
     * 商品数量
     */
    private Integer proCount;	// 商品数量

    /**
     * 价格小计
     */
    private BigDecimal subtotal;	// 购物项小计

    /**
     * 商品id
     */
    private Integer productId;

    /**
     * 商品名称冗余字段
     */
    private String productName;

    /**
     * 商品小图冗余字段
     */
    private String productImage;

    /**
     * 产品单价冗余字段
     */
    private Float proPrice;

    public Float getProPrice() {
        return proPrice;
    }

    public void setProPrice(Float proPrice) {
        this.proPrice = proPrice;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCartId() {
        return cartId;
    }

    public void setCartId(Integer cartId) {
        this.cartId = cartId;
    }

    public Integer getProCount() {
        return proCount;
    }

    public void setProCount(Integer proCount) {
        this.proCount = proCount;
    }

    public BigDecimal getSubtotal() {
        return subtotal;
    }

    public void setSubtotal(BigDecimal subtotal) {
        this.subtotal = subtotal;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductImage() {
        return productImage;
    }

    public void setProductImage(String productImage) {
        this.productImage = productImage;
    }

    public CustomCartItem(){}

    public CustomCartItem(Integer id, Integer cartId, Integer proCount, BigDecimal subtotal, Integer productId, String productName, String productImage,Float proPrice) {
        this.id = id;
        this.cartId = cartId;
        this.proCount = proCount;
        this.subtotal = subtotal;
        this.productId = productId;
        this.productName = productName;
        this.productImage = productImage;
        this.proPrice = proPrice;
    }

    @Override
    public String toString() {
        return "CustomCartItem{" +
                "id=" + id +
                ", cartId=" + cartId +
                ", proCount=" + proCount +
                ", subtotal=" + subtotal +
                ", productId=" + productId +
                ", proPrice=" + proPrice +
                ", productName='" + productName + '\'' +
                ", productImage='" + productImage + '\'' +
                '}';
    }
}
